<!--
/*
*All rights reserved: Json.
*Links:http://www.liyaoquan.cn.
*Links:http://imarkchina.cn.
*Links:http://www.imarkchina.cn.
*/
-->
{A('public/tools')}
{if $check}
<script type="text/javascript">
	function selectAll(){
		var checklist = document.getElementsByName("id[]");
		if(document.getElementById("controlAll").checked) {
			for(var i=0;i<checklist.length;i++) {
				checklist[i].checked = 1;
			}
		}else{
			for(var j=0;j<checklist.length;j++)  {
				checklist[j].checked = 0;
			}
		}
	}
</script>
{/if}
<div class="main-wrap">
	<div class="crumb-wrap">
		<div class="crumb-list"><span class="crumb-name">日志管理</span></div>
	</div>
	<div class="result-wrap">
		<form action="{U('allrecovery')}" method="post">
			<div class="result-title">
				<div class="result-list">
					<select onchange="location.href=this.value;">
						<option value="{U('index')}">全部分类</option>
						{foreach $list $k $v}
						<option value="{U('index',array('lid'=>$k))}" {if $k==G('get.lid')}selected="selected"{/if}>{$v}</option>
						{/foreach}
					</select>
					<a href="{U('add')}"><i class="icon-font"></i>新增日志</a>
					<a href="{U('bloglist/add')}"><i class="icon-font"></i>新增分类</a>
					{if $check}
					<input type="submit" class="icon-font" value="批量回收" name="del" />
					{/if}
				</div>
			</div>
			<div class="result-content">
				<table class="result-tab" width="100%">
					<tr>
						{if $check}
						<th class="tc" width="5%">
							<input class="allChoose" onclick="selectAll()" id="controlAll" type="checkbox" />
						</th>
						{/if}
						<th>标题</th>
						<th>添加时间</th>
						<th>分类</th>
						<th>评论</th>
						<th>点击</th>
						<th>操作</th>
					</tr>
					{foreach $pfile $v}
					<tr>
						{if $check}
						<td class="tc">
							<input name="id[]" value="{$v['id']}" type="checkbox" />
							<input type="hidden" name="lid" value="{$v['listid']}" />
						</td>
						{/if}
						<td title="{$v['title']}">
							<a class="link-update" href="{U('add',array('eid'=>$v['id']))}">{$v['title']}</a>
						</td>
						<td>{$v['date']} / {$v['time']}</td>
						<td>
							{if $check}
							{$v['list']}
							{else}
							<a href="{U('index',array('lid'=>$v['listid']))}">{$v['list']}</a>
							{/if}
						</td>
						<td>{A('public/pinglun', $v['id'])}</td>
						<td>{A('public/hits', $v['id'])}</td>
						<td>
							{if $v['istop']}
							<a class="link-update" href="{U('delistop',array('id'=>$v['id']))}">取消置顶</a>
							{else}
							<a class="link-update" href="{U('setistop',array('id'=>$v['id'],'lid'=>$v['listid']))}">置顶</a>
							{/if}
							<a class="link-update" href="{U('add',array('eid'=>$v['id']))}">修改</a>
							<a class="link-update" href="{U('recovery',array('lid'=>$v['listid'],'id'=>$v['id']))}">回收</a>
						</td>
					</tr>
					{/foreach}
				</table>
				<div class="list-page"> {$page}</div>
			</div>
		</form>
	</div>
</div>
<!--/main-->
</div>
</body>
</html>